#pragma strict

private var fade_time_elapsed:float;
var fade_time:float;
var ascension_speed:float;

function Start () {
	fade_time_elapsed = 0;
	rigidbody.velocity.y = ascension_speed;
}

function Update () {
	fade_time_elapsed += Time.deltaTime;
	renderer.material.color.a = 1 - (fade_time_elapsed / fade_time);
	if (fade_time_elapsed >= fade_time) Destroy(gameObject);
}